<?xml version="1.0" encoding="us-ascii"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="html" encoding="US-ASCII"
		doctype-public="-//W3C//DTD HTML 4.01//EN"
		doctype-system="http://www.w3.org/TR/html4/strict.dtd" indent="yes"
		cdata-section-elements="javascript-escape" media-type="text/html" />
	<xsl:template match="/">
		<html>
			<head>
				<link rel="stylesheet" type="text/css"
					href="http://www.own-id.com/style/" />
				<xsl:if test="/delegator/@op-endpoint">
					<link rel="openid.server"
						href="{/delegator/@op-endpoint}" />
					<link rel="openid2.provider"
						href="{/delegator/@op-endpoint}" />
				</xsl:if>
				<xsl:if test="/delegator/@op-local-id">
					<link rel="openid.delegate"
						href="{/delegator/@op-local-id}" />
					<link rel="openid2.local_id"
						href="{/delegator/@op-local-id}" />
				</xsl:if>
				<!--
				<xsl:if test="/delegator/@yadis-location">
					<meta http-equiv="X-XRDS-Location"
						content="{/delegator/@yadis-location}" />
				</xsl:if>
				-->
				<link rel="icon" type="image/png"
					href="http://www.own-id.com/favicon/" />
				<title>
					Own-Id -
					<xsl:value-of
						select="concat('http://', /delegator/request/@server-authority, /delegator/request/@context-path, '/')" />
				</title>
			</head>
			<body>
				<div id="container">
					<p id="logo">
						<a href="http://www.own-id.com/">
							<img src="http://www.own-id.com/logotip/"
								title="Own-Id" />
						</a>
					</p>
					<xsl:choose>
						<xsl:when
							test="/delegator/response/@status-code='404'">
							<p>404 Not Found</p>
						</xsl:when>
						<xsl:otherwise>
							<xsl:if test="/delegator/@op-local-id">
								<p>
									<a href="http://www.own-id.com/">
										<xsl:value-of select="'Own-Id'" />
									</a>
									is a free service that lets you use
									your own domain name (eg.
									id.example.com) as your
									<a
										href="http://en.wikipedia.org/wiki/OpenID">
										<xsl:value-of select="'OpenId'" />
									</a>
									Identifier.
								</p>
							</xsl:if>
							<p>
								This is the OpenId page for
								<span class="red">
									<xsl:value-of
										select="concat('http://', /delegator/request/@server-authority, /delegator/request/@context-path, '/')" />
								</span>
							</p>
							<xsl:if test="/delegator/message">
								<ul>
									<xsl:for-each
										select="/delegator/message">
										<li>
											<xsl:value-of select="." />
										</li>
									</xsl:for-each>
								</ul>
							</xsl:if>
							<xsl:choose>
								<xsl:when
									test="/delegator/@op-local-id">
									<ul>
										<li>
											OP Endpoint URL:
											<xsl:value-of
												select="/delegator/@op-endpoint" />
										</li>
										<li>
											OP-Local Identifier:
											<xsl:value-of
												select="/delegator/@op-local-id" />
										</li>
										<!--
										<xsl:if
											test="/delegator/@yadis-location">
											<li>
												Yadis Location:
												<xsl:value-of
													select="/delegator/@yadis-location" />
											</li>
										</xsl:if>
										-->
									</ul>
									<xsl:choose>
										<xsl:when
											test="/delegator/request/openid[@op-local-id = /delegator/@op-local-id]">
											<form action="."
												method="post">
												<fieldset>
													<legend>
														Update
													</legend>
													<br />
													<label>
														OP-Local
														Identifier
														<xsl:value-of
															select="' '" />
														<input size="60"
															name="openid_identifier">
															<xsl:attribute
																name="value">
																<xsl:choose>
																	<xsl:when
																		test="/delegator/request/control[@name='openid_identifier']">
																		<xsl:value-of
																			select="/delegator/request/control[@name='openid_identifier']" />
																	</xsl:when>
																	<xsl:otherwise>
																		<xsl:value-of
																			select="/delegator/@op-local-id" />
																	</xsl:otherwise>
																</xsl:choose>
															</xsl:attribute>
														</input>
													</label>
													<br />
													<br />
													<input type="submit"
														value="Update" />
													<xsl:value-of
														select="' '" />
													<input type="reset"
														value="Reset" />
												</fieldset>
											</form>
											<br />
											<form action="."
												method="post">
												<fieldset>
													<legend>
														Sign out
													</legend>
													<br />
													<input type="submit"
														name="sign-out" value="Sign out" />
												</fieldset>
											</form>
										</xsl:when>
										<xsl:otherwise>
											<form action="."
												method="post">
												<fieldset>
													<legend>
														Sign in
													</legend>
													<br />
													<input type="submit"
														value="Sign in" />
												</fieldset>
											</form>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:when>
								<xsl:otherwise>
									<p>
										To set up this custom domain,
										get an OpenId Identifier from
										<a
											href="http://openid.net/get/">
											<xsl:value-of
												select="'a provider'" />
										</a>
										and enter it below:
									</p>
									<form action="." method="post">
										<fieldset>
											<legend>Set OpenId</legend>
											<br />
											<label>
												<xsl:value-of
													select="'OpenId '" />
												<input
													id="openid_identifier" size="40" name="openid_identifier"
													value="{/delegator/request/control[@name='openid_identifier']}" />
											</label>
											<xsl:value-of select="' '" />
											<input type="submit"
												value="Set OpenId" />
										</fieldset>
									</form>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:otherwise>
					</xsl:choose>
					<br />
					<script type="text/javascript">
						/*
						<javascript-escape>
							<![CDATA[      */
					
google_ad_client = "pub-0636624415090336";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
//2007-10-13: own-id
google_ad_channel = "7723682505";
google_color_border = "CCCCCC";
google_color_bg = "CCCCCC";
google_color_link = "000000";
google_color_text = "333333";
google_color_url = "666666";
google_ui_features = "rc:6";

				/* ]]>
						</javascript-escape>
						*/
					</script>
					<script type="text/javascript"
						src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
					</script>
					<p id="footer">
						<a href="mailto:tlocke@tlocke.org.uk">
							<xsl:value-of select="'Contact'" />
						</a>
						<xsl:value-of select="' | '" />
						<a
							href="http://blog.tlocke.org.uk/search/label/own-id">
							<xsl:value-of select="'Blog'" />
						</a>
						<xsl:value-of select="' | Powered by '" />
						<a
							href="http://code.google.com/p/openid-delegator/">
							<xsl:value-of
								select="'OpenId Delegator Software'" />
						</a>
						<xsl:value-of select="' | '" />
						<a href="http://www.own-id.com/faq/">FAQ</a>
					</p>
				</div>
				<script src="http://www.google-analytics.com/urchin.js"
					type="text/javascript">
				</script>
				<script type="text/javascript">
					_uacct = "UA-1004155-8"; urchinTracker();
				</script>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>
